﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LineEnquiry.aspx.cs" Inherits="MTRC.ODMS.Web.SOM.CodeSetup.FireLinkRestoreList" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxControlToolkit" %>
<%@ Register Src="~/UserControl/Menu/PageFoot.ascx" TagName="PageFoot" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/TabStrip.ascx" TagName="TabStrip" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/PageHead.ascx" TagName="PageHead" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/MainMenu.ascx" TagName="MainMenu" TagPrefix="WebStructure" %>
<%@ Register TagPrefix="APJ" Namespace="APJ.Web.UI.WebControls" Assembly="APJ.Web.UI.WebControls" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Operational Data Management System</title>
    <link href="<%=ResolveUrl("~/CSS/common.css")%>" rel="stylesheet" type="text/css" />
    <link href="../../CSS/common.css" rel="stylesheet" type="text/css" />
    <link href="~/CSS/Menu.css" rel="stylesheet" type="text/css" />
    <script language="javascript" type="text/javascript">
        function AddNew() {
            if (IsServerChanged) {
                if (confirm(LeavePage)) {
                    window.location.href = "LineEntry.aspx?action=new";
                }
            }
            else {
                window.location.href = "LineEntry.aspx?action=new";
            }
            return false;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <AjaxControlToolkit:ToolkitScriptManager ID="ToolkitScriptManager" runat="server">
    </AjaxControlToolkit:ToolkitScriptManager>
    <table border="0" cellpadding="0" cellspacing="0" class="Page_Container">
        <tr>
            <td colspan="2" class="Page_Head">
                <WebStructure:PageHead ID="PageHead" runat="server" />
            </td>
        </tr>
        <tr>
            <td class="Page_Left">
                <WebStructure:MainMenu ID="MainMenu" runat="server" apppath="../../" CurrMenuID="M140920" />
            </td>
            <td class="Page_Right">
                <table class="Page_Contents">
                    <tr>
                        <td class="TabStrip">
                            <WebStructure:TabStrip ID="TabStrip" CurrMenuID="M140825" ParentMenuID="M140920"
                                DMenuMode="CurrOnly" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td class="Contents">
                            <!--Insert Code Here.-->
                            <div class="SearchArea" style="margin-bottom: 5px; width: 99.8%;">
                                <table id="tblMain" cellspacing="1" cellpadding="1" width="100%" border="0">
                                    <tr>
                                        <td>
                                            <asp:Label ID="lblSOMSLineSetup" runat="server" Text="SOMS Line Setup"/>
                                        </td>
                                        <td align="right">
                                            <asp:Button ID="btnAddNew" runat="server" Text="Add New" OnClientClick="return AddNew();" />
                                        </td>
                                    </tr>
                                </table>
                            </div>
                            <APJ:CommonGridView ID="grdSearchResult" runat="server" AutoGenerateColumns="False"
                                AllowPaging="True" BorderColor="black" CssClass="GridView" AllowSorting="True"
                                AscPic="~/Images/Common/arrow_up_green.png" DescPic="~/Images/Common/arrow_down_green.png"
                                DataKeyNames="SOMLineID" OnNeedDataBind="grdSearchResult_NeedDataBind" OnRowCommand="grdSearchResult_RowCommand"
                                Width="100%">
                                <Columns>
                                    <asp:BoundField DataField="Code" HeaderText="SOM_LineCodeCode" SortExpression="Code">
                                        <ItemStyle Width="10%" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Description" HeaderText="SOM_LineDescription" SortExpression="Description">
                                        <ItemStyle Width="20%" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="LineCode" HeaderText="SOM_LineLine" SortExpression="LineCode">
                                        <ItemStyle Width="5%" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Sequence" HeaderText="SOM_LineSequence" SortExpression="Sequence">
                                        <ItemStyle Width="5%" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="BelongsToLineGroup" HeaderText="SOM_LineBelongtoLineGroup"
                                        SortExpression="BelongsToLineGroup">
                                        <ItemStyle Width="10%" HorizontalAlign="Center" />
                                    </asp:BoundField>
                                    <asp:TemplateField HeaderText="SOM_LineLineGroup" SortExpression="LineGroup">
                                        <ItemTemplate>
                                            <asp:CheckBox ID="CbxLineGroup" runat="server" Checked='<%#IsChecked(Eval("LineGroup"))  %>'
                                                Enabled="false" />
                                        </ItemTemplate>
                                        <ItemStyle Width="7%" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="SOM_LineLineStatus" SortExpression="LineStatus">
                                        <ItemTemplate>
                                            <asp:CheckBox ID="CbxLineStatus" runat="server" Checked='<%#IsChecked(Eval("LineStatus"))  %>'
                                                Enabled="false" />
                                        </ItemTemplate>
                                        <ItemStyle Width="10%" />
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="FontColor" HeaderText="SOM_LineFontColor" SortExpression="FontColor">
                                        <ItemStyle Width="10%" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="BackColor" HeaderText="SOM_LineBackColor" SortExpression="BackColor">
                                        <ItemStyle Width="10%" />
                                    </asp:BoundField>
                                    <asp:TemplateField HeaderText="SOM_LineObsolete" SortExpression="Obsolete">
                                        <ItemTemplate>
                                            <asp:CheckBox ID="CbxObsolete" runat="server" Checked='<%#IsChecked(Eval("Obsolete"))  %>'
                                                Enabled="false" />
                                        </ItemTemplate>
                                        <ItemStyle Width="10%" />
                                    </asp:TemplateField>
                                    <asp:TemplateField>
                                        <ItemTemplate>
                                            <asp:ImageButton ID="Btn_edit" ToolTip='<%# this.GetLabel("COM_Edit") %>' runat="server"
                                                CssClass="link" CommandName="Edit" CommandArgument='<%# Eval("SOMLineID") %>'
                                                ImageUrl="../../Images/SOM/Edit.gif"></asp:ImageButton>
                                        </ItemTemplate>
                                        <ItemStyle Width="3%" />
                                    </asp:TemplateField>
                                </Columns>
                                <RowStyle CssClass="GridView_Row" />
                                <HeaderStyle CssClass="GridView_Header" />
                                <AlternatingRowStyle CssClass="GridView_AlternativeRow" />
                                <EmptyDataRowStyle CssClass="GridView_Header" />
                                <PagerTemplate>
                                    <asp:Table ID="CommonPagerTemplate" runat="server" Width="100%">
                                        <asp:TableRow ID="COMGRIDV_TR" runat="server">
                                            <asp:TableCell ID="COMGRIDV_Pager_Cell_TotalRecords" runat="server" CssClass="GridView_Pager_Cell_TotalRecords">
                                                <asp:Label ID="Lbl_T_TotalRecords" runat="server">Total Records:</asp:Label>
                                                <asp:Label ID="Lbl_V_TotalRecords" runat="server"></asp:Label>
                                                &nbsp; &nbsp;
                                                <asp:Label ID="Lbl_V_CurPage" runat="server"></asp:Label>
                                                &nbsp;<asp:Label ID="Label1" runat="server">/</asp:Label>
                                                &nbsp;<asp:Label ID="Lbl_V_TotalPages" runat="server"></asp:Label>
                                            </asp:TableCell>
                                            <asp:TableCell ID="COMGRIDV_Pager_Cell_PageSize" runat="server" CssClass="GridView_Pager_Cell_PageSize">
                                                <asp:Label ID="Lbl_T_PageSize" runat="server">PageSize:</asp:Label>
                                                &nbsp;&nbsp;<asp:DropDownList ID="DDL_PageSize" runat="server" AutoPostBack="True">
                                                    <asp:ListItem Value="5">5</asp:ListItem>
                                                    <asp:ListItem Value="10">10</asp:ListItem>
                                                    <asp:ListItem Value="15">15</asp:ListItem>
                                                    <asp:ListItem Value="20">20</asp:ListItem>
                                                    <asp:ListItem Value="25">25</asp:ListItem>
                                                    <asp:ListItem Value="30">30</asp:ListItem>
                                                </asp:DropDownList>
                                            </asp:TableCell>
                                            <asp:TableCell ID="COMGRIDV_Pager_Cell_Prev" runat="server" CssClass="GridView_Pager_Cell_Prev">
                                                <asp:LinkButton ID="LBtn_Previous" runat="server" CommandArgument="Prev" CommandName="Page"><</asp:LinkButton>
                                            </asp:TableCell>
                                            <asp:TableCell ID="COMGRIDV_Pager_Cell_PagerLink" runat="server" CssClass="GridView_Pager_Cell_PagerLink">
                                                <asp:Panel ID="Pnl_PageLink" runat="server" CssClass="GridView_Pager_PageLinkPanel">
                                                </asp:Panel>
                                            </asp:TableCell>
                                            <asp:TableCell ID="COMGRIDV_Pager_Cell_Next" runat="server" CssClass="GridView_Pager_Cell_Next">
                                                <asp:LinkButton ID="LBtn_Next" runat="server" CommandArgument="Next" CommandName="Page">></asp:LinkButton>
                                            </asp:TableCell>
                                        </asp:TableRow>
                                    </asp:Table>
                                </PagerTemplate>
                                <EmptyDataTemplate>
                                    <asp:Table ID="Table1" runat="server" CssClass="GridView_Header_EmptyData">
                                        <asp:TableRow ID="TableRow1" runat="server">
                                            <asp:TableCell ID="TableCell1" runat="server" Style="border-right: black 1px solid;"></asp:TableCell>
                                            <asp:TableCell ID="TableCell2" runat="server" Style="border-right: black 1px solid;"></asp:TableCell>
                                            <asp:TableCell ID="TableCell3" runat="server" Style="border-right: black 1px solid;"></asp:TableCell>
                                            <asp:TableCell ID="TableCell4" runat="server" Style="border-right: black 1px solid;"></asp:TableCell>
                                            <asp:TableCell ID="TableCell5" runat="server" Style="border-right: black 1px solid;"></asp:TableCell>
                                            <asp:TableCell ID="TableCell6" runat="server" Style="border-right: black 1px solid;"></asp:TableCell>
                                            <asp:TableCell ID="TableCell7" runat="server"></asp:TableCell>
                                        </asp:TableRow>
                                    </asp:Table>
                                </EmptyDataTemplate>
                            </APJ:CommonGridView>
                        </td>
                    </tr>
                    <tr>
                        <td class="Page_Foot" style="height: 54px">
                            <WebStructure:PageFoot ID="PageFoot" runat="server" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
